﻿/*******************************************************************************
 * Copyright © 2017 FriendStar.Framework 版权所有
 * Author: FZH
 * Description: FriendStar快速开发平台
 * Website：http://www.FriendStar.cn
*********************************************************************************/
using System;
using SqlSugar;

namespace FriendStar.Domain.Entity.WareHouse
{
    /// <summary>
	/// 数据视图 V_MCG_11_HT_MaterialPurchaseDJ_DA 对应的数据实体类，数据表描述：
	/// </summary>
    [Serializable]
    [SugarMapping(TableName = "V_MCG_11_HT_MaterialPurchaseDJ_DA")]
	public partial class V_MCG_11_HT_MaterialPurchaseDJ_DAEntity
    {
        ///<summary>
		///
		///</summary>
        public string ID { get; set; } 
        ///<summary>
		///
		///</summary>
        public string UseUnit { get; set; } 
        ///<summary>
		///
		///</summary>
        public string JHBH { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGHTRQ { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGHTBH { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGGHDW { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGGHDWMC { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CLFL { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CLFLMC { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGCLPH { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGCLGG { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGCLBZBH { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGCLTSYQ { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGCGFS { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGCGFSMC { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGCGFL { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGCGFLMC { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGCD { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGCDMC { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGDZ { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGDZMC { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGLX { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGLXMC { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGYT { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGYTMC { get; set; } 
        ///<summary>
		///
		///</summary>
        public decimal? CGDHSL { get; set; } 
        ///<summary>
		///
		///</summary>
        public decimal? CGCGDJ { get; set; } 
        ///<summary>
		///
		///</summary>
        public decimal? CGDZDJ { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGBHSM { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGWHZT { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGDJRY { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGDJRQ { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGDJSJ { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGFBRY { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGFBRQ { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGFBSJ { get; set; } 
        ///<summary>
		///
		///</summary>
        public string CGPrintStatues { get; set; } 
        ///<summary>
		///
		///</summary>
        public string MaterialNO { get; set; }

        public decimal? CGDHSL_KG
        {
            get 
            {
                if (CGDHSL.HasValue)
                {
                    return CGDHSL.Value * 1000;
                }
                else
                {
                    return null;
                }
            }
        }

        public decimal? CGCGDJ_KG
        {
            get
            {
                if (CGCGDJ.HasValue)
                {
                    return CGCGDJ.Value / 1000;                    
                    //return Math.Round(CGCGDJ.Value / 1000, 2);
                }
                else
                {
                    return null;
                }
            }
        }
    }
}